/*
求 N 的阶乘  。
 */


import java.util.Scanner;
public class Work2 {
    public static int jiecheng(int n){
        if(n==1)
            return 1;
        return n * jiecheng(n-1);
    }

    public static void main2(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        System.out.println(jiecheng(n));
    }
}
